package cn.uniquetech.hky;

import java.util.List;

public class GenMapperUtil {
	public static String genMapperStr(List<ColumnVO> columnList) {
		StringBuffer sb = new StringBuffer();

		ColumnVO columnVO = columnList.get(0);
		String packagePath = GenerateCodeMysql.PACKAGENAME + ".mapper";
		String clazz = columnVO.getVoName();
		
		sb.append("package " + packagePath + ";\r\n");
		sb.append("import cn.uniquesoft.vo."+clazz+"VO;"+"\r\n");
		sb.append("\r\n");
		sb.append("/**" + "\r\n");
		sb.append("* @创建人名 " + GenerateCodeMysql.cjrName + "\r\n");
		sb.append("* @创建日期 " + DateUtil.curDateTime() + "\r\n");
		sb.append("* @文件描述 " + columnVO.getTbRemarks() + "Mapper \r\n");
		sb.append(" */" + "\r\n");
		sb.append("public interface " + clazz + "Mapper" + " extends BaseMapper<" + clazz + "VO>" + " {\r\n");
		sb.append("}\r\n");
		FileUtil.writeFile(packagePath, clazz + "Mapper" + ".java", sb.toString());
		return sb.toString();
	}
}
